Networks and Graph Theory - Finding the shortest path.
Test Yourself 1 - Solutions.
1. Find the shortest path from A to F.
|
A(0) B(2) D(3) E(4) |
B
2
|
C
7 |
D
4 3 |
E
4 6 |
F
6 |
||
|
||||||||
2. Find the shortest path from A to G.
|
A(0) B(6) D(11) C(12) E(17) |
B
6 |
C
12 15 |
D
11 |
E
22 17 |
F
23 |
G
23 |
|
|
||||||||
3. Find the shortest path from A to C. |
A(0) B(5) H(7) F(9) G(10) E(15) D(10) |
B
5
15 |
C
16
18 14 |
D
10
22 |
E
19 15 |
F
9
25 |
G
11 17 10 |
H
7 13 |
Step 1: AB is shortest. |
4.
∴shortest path from B to H is B-C-F-G-H with a path length of 15+7+8+6 = 36 hours. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5.
The minimum path is therefore:
The minimum cost is $14. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7.
So the minimum path is A-D-J-F-H and it is of length 10. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||